Match'em Poker
==============

Match'em Poker is a match-N type game originally written for iOS. This project
was created to study porting of this game to the Qt platform using OpenGL ES 2.0
and the Qt GameEnabler.

Match'em Poker has been tested on Symbian (Qt 4.7.4 and Qt Mobility 1.2.1) and
MeeGo 1.2 Harmattan.

This example application is hosted in Nokia Developer Projects:
- http://projects.developer.nokia.com/matchempoker

For more information on implementation and porting, visit the wiki pages:
- http://projects.developer.nokia.com/matchempoker/wiki
- http://projects.developer.nokia.com/matchempoker/wiki/porting_diary


What's new in version 1.2
-------------------------

The performance of the game was optimized by integrating the Sprite Batch
design pattern. For more information, see the Sprite Batch project at
http://projects.developer.nokia.com/spritebatchqt


1. How to play
-------------------------------------------------------------------------------

Switch the cards on a grid to form different poker hands in any direction. 
Fill the score meter to advance to the next level. The score meter drops
continuously with time. If it reaches zero, the game is over.


2. Prerequisites
-------------------------------------------------------------------------------

- Qt basics
- OpenGL ES 2.0 intermediate


3. Important files and classes
-------------------------------------------------------------------------------

Source files:

- main.cpp: Executes the application
- npclevel.h/cpp: The 'actual' game part of the application
- ParticleEngine.h/cpp: Simulates particles and draws them on the screen
- tilegameinterfaces.h/cpp: Interfaces for game and engine
- tilenpc.h/cpp: Implementation of an interface TileGame. The platform-
  independent main game.


4. Compatibility
-------------------------------------------------------------------------------

- Symbian (Qt 4.7.4 and Qt Mobility 1.2.1)
- Nokia N9 (MeeGo 1.2 Harmattan)

Tested on: 
- Nokia C7-00
- Nokia E7-00
- Nokia N8-00
- Nokia N9
- Nokia N950

Developed with Qt SDK 1.1.

4.1 Required Capabilities
-------------------------

None; The application can be self signed on Symbian.

4.2 Known Issues
----------------

The code is not completely written based on the Qt coding conventions.
In addition, the architecture does not represent the best practices.

4.3 Original iOS version
------------------------

The original iOS version was developed with Xcode 4.0 (iOS SDK 4.3) and tested
on Apple iPhone 4. The iOS version is also delivered with this project and can
be located in 'ios' folder. You can also browse the project iOS version source
online at http://projects.developer.nokia.com/matchempoker/browser/trunk/ios.


5. Building, installing and running the application
-------------------------------------------------------------------------------

5.1 Preparations
----------------

Check that you have the latest Qt SDK installed in the development environment
and the latest Qt version on the device.

5.2 Using Qt SDK
----------------

You can install and run the application on the device by using the Qt SDK.
Open the project in the SDK, set up the correct target (depending on the device
platform), and click the Run button. For more details about this approach,
please visit the Qt Getting Started at Nokia Developer
(http://www.developer.nokia.com/Develop/Qt/Getting_started/).

5.3 Symbian device
------------------

Make sure your device is connected to your computer. Locate the .sis
installation file and open it with Ovi Suite. Accept all requests from Ovi
Suite and the device. Note that you can also install the application by copying
the installation file onto your device and opening it with the Symbian File
Manager application.

After the application is installed, locate the application icon from the
application menu and launch the application by tapping the icon.

5.4 Nokia N9 and Nokia N950
---------------------------

Copy the application Debian package onto the device. Locate the file with the
device and run it; this will install the application. Note that you can also
use the terminal application and install the application typing the command
'dpkg -i <package name>.deb' on the command line. To install the application
using the terminal application, make sure you have the right privileges 
to do so (e.g. root access).

Once the application is installed, locate the application icon from the
application menu and launch the application by tapping the icon.

5.5 Building for desktop
------------------------

If you want to build the application on a desktop, you must provide libraries 
capable of OpenGL ES 2.0 (emulation). These are normally not preinstalled on 
desktop systems. You can get free emulation libraries from Imgtec:
http://www.imgtec.com/powervr/insider/sdkdownloads/index.asp#GLES2


6. License
-------------------------------------------------------------------------------

See the license text file delivered with this project. The license file is also
available online at
http://projects.developer.nokia.com/matchempoker/browser/trunk/Licence.txt


7. Change history
-------------------------------------------------------------------------------

1.2 Integrated Sprite Batch design pattern
1.1 Added support for MeeGo 1.2 Harmattan
1.0 Initial release
